-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENH] Render code blocks with language "tsv" as tables #1794
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
that's way quicker than anything I would have done I can try tweaking this to see if I can make it work |
FWIW I think this is not an |
that's fair |
75f1968
to
bc86f79
Compare
0f1b9fd
to
7f33895
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Links and screenshots of all affected locations.
```tsv | ||
session_id acq_time systolic_blood_pressure | ||
ses-predrug 2009-06-15T13:45:30 120 | ||
ses-postdrug 2009-06-16T13:45:30 100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```tsv | ||
filename acq_time | ||
func/sub-control01_task-nback_bold.nii.gz 1877-06-15T13:45:30 | ||
func/sub-control01_task-motor_bold.nii.gz 1877-06-15T13:55:33 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```tsv | ||
session_id acq_time systolic_blood_pressure | ||
ses-predrug 2009-06-15T13:45:30 120 | ||
ses-postdrug 2009-06-16T13:45:30 100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```tsv | ||
trial response response_time stim_file | ||
congruent red 1.435 images/word-red_color-red.jpg | ||
incongruent red 1.739 images/word-red_color-blue.jpg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```tsv | ||
volume_type | ||
control | ||
label |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```tsv | ||
34 110 0 | ||
44 112 0 | ||
23 100 1 | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```tsv | ||
onset duration trial_type response_time stim_file channel annots | ||
1.23 0.65 start 1.435 images/red_square.jpg n/a n/a | ||
5.65 0.65 stop 1.739 images/blue_square.jpg n/a n/a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```tsv | ||
participant_id age sex handedness group | ||
sub-01 34 M right read | ||
sub-02 12 F right write | ||
sub-03 33 F n/a read | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```tsv | ||
sample_id participant_id sample_type derived_from | ||
sample-01 sub-01 tissue n/a | ||
sample-02 sub-01 tissue sample-01 | ||
sample-03 sub-01 tissue sample-01 | ||
sample-04 sub-02 tissue n/a | ||
sample-05 sub-02 tissue n/a | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```tsv | ||
time plasma_radioactivity whole_blood_radioactivity metabolite_parent_fraction metabolite_polar_fraction | ||
0 0 0 1 0 | ||
145 43.31 33.79 0.5749 0.1336 | ||
292 48.96 37.42 0.3149 0.2746 | ||
602 39.84 32.05 0.1469 0.3548 | ||
1248 37.38 31.52 0.073 0.444 | ||
1785 36.40 28.83 0.078 0.429 | ||
2390 33.13 26.32 0.061 0.453 | ||
3059 30.83 25.22 0.049 0.473 | ||
4196 27.28 21.98 0.036 0.503 | ||
5407 22.70 19.49 0.032 0.523 | ||
7193 19.71 15.70 0.02 0.559 | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess original description should get this sentence crossed-out/removed?
It's not working 100% for me, but I've maxed out my time on this. Pushed to upstream so others can take it up or open PRs against it.
I have tested a cut on linux producing tab separated representation somehow, so as to me it is everything anyone could hope for.
Well done @effigies . Thanks for posting all previews!
custom_fences: | ||
- name: tsv | ||
class: tsv | ||
format: !!python/name:bidsschematools.render.tsv.fence |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heck yes!!!
Let's go (just because of the sheer number of things this closes)
|
Rendered: https://bids-specification--1794.org.readthedocs.build/en/1794/
This is another go at #644 along the lines of #1783 (comment).
It's not working 100% for me, but I've maxed out my time on this. Pushed to upstream so others can take it up or open PRs against it.The code for this does not need to live in bidsschematools, but that's the quickest way to get something into the import namespace.
cc @Remi-Gau